package com.liangliang.utils;

import java.util.Random;
import java.util.UUID;

public class DataSimulator {

    private static Random random = new Random();

    public static String randomDate() {
        return "2024-07-" + (10 + random.nextInt(10));
    }

    public static Long randomUserId() {
        return 10000L + random.nextInt(1000);
    }

    public static String randomSessionId() {
        return UUID.randomUUID().toString();
    }

    public static Long randomPageId() {
        return (long) random.nextInt(100);
    }

    public static String randomActionTime() {
        return "2024-07-20 " + random.nextInt(24) + ":" + random.nextInt(60) + ":" + random.nextInt(60);
    }

    public static String randomSearchKeyword() {
        String[] keywords = {"手机", "电脑", "美食", "服装"};
        return keywords[random.nextInt(keywords.length)];
    }

    public static Long randomClickCategoryId() {
        return (long) random.nextInt(10);
    }

    public static Long randomClickProductId() {
        return (long) random.nextInt(100);
    }

    public static String randomOrderCategoryIds() {
        return randomClickCategoryId() + "," + randomClickCategoryId();
    }

    public static String randomOrderProductIds() {
        return randomClickProductId() + "," + randomClickProductId();
    }

    public static String randomPayCategoryIds() {
        return randomClickCategoryId() + "," + randomClickCategoryId();
    }

    public static String randomPayProductIds() {
        return randomClickProductId() + "," + randomClickProductId();
    }

    public static Long randomCityId() {
        return (long) random.nextInt(50);
    }
}
